<?php
	header("content-type:text/html;charset=utf-8");
	session_start();//开启会话
	const DSN = 'mysql:host=localhost;dbname=kptest';
	const DBUSER = 'root';
	const DBPWD = 'root';
	$pdo = new PDO(DSN, DBUSER, DBPWD);
	$uid = empty($_SESSION['id']) ? 0 : $_SESSION['id'];
//	try {
//		$pdo = new PDO(DSN, DBUSER, DBPWD);
//	
//	} catch(PDOException $e) {
//		echo "ERROR:" . $e -> getMessage();
//		//输出错误信息
//	}
?>